package com.tszs.biz;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tszs.dao.mapper.DistributorMapper;
import com.tszs.entity.Distributor;
import com.tszs.entity.DistributorExample;
/**
 * @类名:DistributorBiz
 * @类描述:分销商
 * @author Administrator
 *
 */
@Service
public class DistributorBiz {
	@Autowired
	private DistributorMapper distributorMapper;
	/***
	 * @方法名：insertSelective
	 * @方法描述：添加
	 * @param record
	 * @return
	 */
	@Transactional
	public 	int insertSelective(Distributor record){
		return distributorMapper.insertSelective(record);
	}
	/***
	 * @方法名：selectByExample
	 * @方法描述：查询
	 * @param record
	 * @return
	 */
	@Transactional
	public 	List<Distributor> selectByExample(DistributorExample example){
		return distributorMapper.selectByExample(example);
	}
	/***
	 * @方法名：selectByExamplePage2
	 * @方法描述：查询
	 * @param record
	 * @return
	 */
	@Transactional
	public 	List<Distributor> selectByExamplePage2(Distributor example){
		return distributorMapper.selectByExamplePage2(example);
	}
	/***
	 * @方法名：updateByExampleSelective
	 * @方法描述：修改
	 * @param record
	 * @return
	 */
	@Transactional
	public 	int updateByExampleSelective(Distributor record,DistributorExample example) {
		return distributorMapper.updateByExampleSelective(record, example);
	}
	
	
	/***
	 * 
	 * @author MRC
	 * @date 2019年5月31日上午11:13:21
	 * @param id
	 * @return
	 */
	public Distributor selectByDidentification(String id){
		
		return distributorMapper.selectByDidentification(id);
		
	}
}
